bin/xbps-install: add --import-key arg for non-interactive key import #568
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
as requested by @the-maldridge
see also: #336, #399
This works around the security concerns brought up in those issues by ensuring that only the requested keys are ever imported automatically, not blindly importing any keys that would be prompted for importation.
This array is a list of key fingerprints that should be imported without confirmation upon importing keys for a signed repository. A new state_cb state is added to allow for showing a message or doing some action when importing these keys.
Allows the user to specify a list of key fingerprints that are expected and should be imported if encountered. This will be useful for scripted or other non-interactive situations, including in xbps-src (removing interaction during operations if the repodata in
hostdir/binpkgs
is signed), and bootstrapping new systems without needing to copy the<fingerprint>.plist
files into place beforehand.Prints a message when importing to ensure the user knows the key was imported: